using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using LGE;

namespace Stealth
{
    public class Stealth : Game
    {
        public GraphicsDeviceManager graphics;
        SpriteBatch spriteBatch;
        public static SpriteFont Font;
        public static int Level = 0;            

        public Stealth()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
        }

        protected override void Initialize()
        {
            Engine.InitGraphicsMode(graphics, 1280, 720, false);
            base.Initialize();
        }

        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            Font = Content.Load<SpriteFont>("Fonts\\font1");
            Audio.Init("Content\\Audio\\Stealth.xgs", "Content\\Audio\\Music.xwb", "Content\\Audio\\Music.xsb");
            Engine.Init(this, new StartScreen());
            Audio.audioEngine.GetCategory("BGM").SetVolume(.5f);
            //Engine.InitTileSystem(50, 50, 30, "Images\\Tiles");
            //GameScreenManager.SetLoadScreenBG(Engine.Load<Texture2D>("Images\\bg_loadingscreen"));
        }

        protected override void Update(GameTime gameTime)
        {
            GameScreenManager.Update(gameTime);
            base.Update(gameTime);
        }

        protected override void Draw(GameTime gameTime)
        {
            spriteBatch.Begin();
            GameScreenManager.Draw(gameTime, spriteBatch);
            spriteBatch.End();
            base.Draw(gameTime);
        }
    }

#if WINDOWS || XBOX
    static class Program
    {
        static void Main(string[] args)
        {
            using (Stealth game = new Stealth())
            {
                game.Run();
            }
        }
    }
#endif
}
